import React from 'react';
import { HashRouter as Router, Redirect, Route, Switch } from 'react-router-dom'
import { Provider } from 'react-redux'
import store from './redux/store'

// root import 
import First from './root/First'
import Choiseuser from './root/Choiseuser';

// user import
import Home from './users/Home'
import All from './users/All'
import Login from './users/Login'
import Me from './users/Me'
import Community from './users/Community'
import Message from './users/Message';
import Setup from './users/Me/FunctionButton/Setup';
import CountyDetail from './users/Home/CountyDetail';
import Detaillist from './users/Home/Detaillist';
import Detail from './users/Home/Detail';

// business import
import Buslogin from './business/root/Buslogin'
import Bushome from './business/Home/Bushome'
import Addsp from './business/Home/Addsp'
import Busme from './business/Busme/Busme'
import Privatechat from './business/Privatechat/Privatechat'
import Appointment from './users/Me/FunctionButton/Appointment';
import Collection from './users/Me/FunctionButton/Collection';
import Release from './users/Me/FunctionButton/Release';

import Modifysp_business from './business/Busme/Modify_business'
import Share from './users/Home/Detail/Share';
import Kefu from './users/Home/Kefu';
import Kefu2 from './business/Privatechat/Kefu2';
import Comment from './business/Dynamic/Comment';
import Video from './root/Video';
import Audio from './root/Audio';
import Accountman from './users/Me/FunctionButton/setup/Accountman';
import Accountsafe from './users/Me/FunctionButton/setup/Accountsafe';
import Feedback from './users/Me/FunctionButton/setup/Feedback';
import Accountbind from './users/Me/FunctionButton/setup/Accountbind';
import { Imageshow } from './users/Dynamic/Imageshow';
import Dynamicdateil from './users/Dynamic/Dynamicdateil';

import Setupbus from '././business/Busme/Setup_bus'
import Accountmanbus from '././business/Busme/setup/Accountman_bus'
import Accountsafebus from '././business/Busme/setup/Accountsafe_bus'
import Accountbindbus from '././business/Busme/setup/Accountbind_bus'
import Feedbackbus from '././business/Busme/setup/Feedback_bus'
import Accountwho_bus from './business/Busme/setup/Accountwho_bus';
import Accountpay_bus from './business/Busme/setup/Accountpay_bus';
import Accountdes_bus from './business/Busme/setup/Accountdes_bus';
import Appointdetail from './users/Home/Appointdetail';
import Publish from './users/Dynamic/Publish';
import './App.css'
const App = () => {
    return <Provider store={store}>
        <Router>
            <Switch>
                <Route path='/first' component={First} />
                <Route path='/shipin' component={Video} />
                <Route path='/yinpin' component={Audio} />
                <Route path='/bushome' component={Bushome} />
                <Route path='/comment' component={Comment} />
                <Route path='/busme' component={Busme} />
                <Route path='/privatechat' component={Privatechat} />
                <Route path='/kefu2' component={Kefu2} />
                <Route path='/imageshow' component={Imageshow} />
                <Route path='/dynaicdateil' component={Dynamicdateil} />
                {/* user page */}
                <Route path='/login' component={Login} />
                <Route path='/home' component={Home} />
                <Route path='/countydetail' component={CountyDetail} />
                <Route path='/detaillist' component={Detaillist} />
                <Route path='/detail' component={Detail} />
                <Route path='/appointdetail' component={Appointdetail} />
                <Route path='/publish' component={Publish}/>

                <Route path='/kefu' component={Kefu} />
                <Route path='/all' component={All} />
                <Route path="/comm" component={Community} />
                <Route path='/mess' component={Message} />
                <Route path='/me' component={Me} />
                <Route path="/appo" component={Appointment}></Route>
                <Route path="/collect" component={Collection}></Route>
                <Route path="/release" component={Release}></Route>
                <Route path="/setup" component={Setup} />
                <Route path="/accountman" component={Accountman} />
                <Route path="/accountsafe" component={Accountsafe} />
                <Route path='/accountbind' component={Accountbind} />
                <Route path="/feedback" component={Feedback} />

                <Route path='/Choiseuser' component={Choiseuser} />
                <Route path='/buslogin' component={Buslogin} />
                <Route path='/modify_business' component={Modifysp_business} />

                <Route path="/setupbus" component={Setupbus} />
                <Route path="/accountmanbus" component={Accountmanbus} />
                <Route path="/accountsafebus" component={Accountsafebus} />
                <Route path='/accountbindbus' component={Accountbindbus} />
                <Route path="/feedbackbus" component={Feedbackbus} />
                <Route path='/accountwhibus' component={Accountwho_bus} />
                <Route path='/accountpaybus' component={Accountpay_bus} />
                <Route path='/accountdesbus' component={Accountdes_bus} />

                <Route render={() => <Redirect to='/first' />} />
            </Switch>
        </Router>
    </Provider>
}
export default App;
//进入前的页面